Integrand size = 30, antiderivative size = 101 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\frac {2 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 C \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 C \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4306, 3089, 2827, 2719, 2715, 2720} \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\frac {2 B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 C \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {2 C \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d} \]
[In]
[Out]
Rule 2715
Rule 2719
Rule 2720
Rule 2827
Rule 3089
Rule 4306
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx \\ & = \left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} (B+C \cos (c+d x)) \, dx \\ & = \left (B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx+\left (C \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \cos ^{\frac {3}{2}}(c+d x) \, dx \\ & = \frac {2 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 C \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {1}{3} \left (C \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 C \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 C \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \\ \end{align*}
Time = 0.24 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.75 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\frac {\sqrt {\sec (c+d x)} \left (6 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+C \left (2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\sin (2 (c+d x))\right )\right )}{3 d} \]
[In]
[Out]
Time = 3.16 (sec) , antiderivative size = 229, normalized size of antiderivative = 2.27
method | result | size |
default | \(\frac {2 \sqrt {\left (-1+2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-4 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 B E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}+2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) C -C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-1+2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(229\) |
parts | \(\frac {2 B \sqrt {\left (-1+2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-1+2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}-\frac {2 C \sqrt {\left (-1+2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (4 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-1+2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(314\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.24 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\frac {2 \, C \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - i \, \sqrt {2} C {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} C {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 i \, \sqrt {2} B {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 i \, \sqrt {2} B {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{3 \, d} \]
[In]
[Out]
\[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\int \left (B + C \cos {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )} \sqrt {\sec {\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {\sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
\[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {\sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \, dx=\int \sqrt {\frac {1}{\cos \left (c+d\,x\right )}}\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right ) \,d x \]
[In]
[Out]